// 
// Decompiled by Procyon v0.5.36
// 

package com.orange.boot.strategy;

import java.util.HashMap;
import com.orange.boot.pm10.service.EnvironmentData26Service;
import com.orange.boot.pm2.service.EnvironmentData20Service;
import com.orange.boot.carbondioxide.service.EnvironmentData6Service;
import com.orange.boot.lightintensity.service.EnvironmentData5Service;
import com.orange.boot.airhumidity.service.EnvironmentData2Service;
import org.springframework.beans.factory.annotation.Autowired;
import com.orange.boot.airtemperature.service.EnvironmentData1Service;
import java.util.Map;
import org.springframework.context.annotation.Configuration;
import org.springframework.beans.factory.InitializingBean;

@Configuration
class EnvironmentStrategyBeanFactory implements InitializingBean {
    public static final Map<String, GetEnvironmentParaStrategy> ENVIRONMENT_PARA_STRATEGY_MAP = new HashMap();
    @Autowired
    private EnvironmentData1Service environmentData1Service;
    @Autowired
    private EnvironmentData2Service environmentData2Service;
    @Autowired
    private EnvironmentData5Service environmentData5Service;
    @Autowired
    private EnvironmentData6Service environmentData6Service;
    @Autowired
    private EnvironmentData20Service environmentData20Service;
    @Autowired
    private EnvironmentData26Service environmentData26Service;

    EnvironmentStrategyBeanFactory() {
    }

    public static void addPaymentStrategy(String code, GetEnvironmentParaStrategy getEnvironmentParaStrategy) {
        ENVIRONMENT_PARA_STRATEGY_MAP.put(code.toUpperCase(), getEnvironmentParaStrategy);
    }

    public static GetEnvironmentParaStrategy getEnvironmentStrategyBean(String code) {
        return (GetEnvironmentParaStrategy)ENVIRONMENT_PARA_STRATEGY_MAP.get(code.toUpperCase());
    }

    public void afterPropertiesSet() throws Exception {
        ENVIRONMENT_PARA_STRATEGY_MAP.put("KQWD", this.environmentData1Service);
        ENVIRONMENT_PARA_STRATEGY_MAP.put("KQSD", this.environmentData2Service);
        ENVIRONMENT_PARA_STRATEGY_MAP.put("GZQD", this.environmentData5Service);
        ENVIRONMENT_PARA_STRATEGY_MAP.put("EYHT", this.environmentData6Service);
        ENVIRONMENT_PARA_STRATEGY_MAP.put("PM", this.environmentData20Service);
        ENVIRONMENT_PARA_STRATEGY_MAP.put("PMTEN", this.environmentData26Service);
    }
}
